<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="language" content="en" />
	<!-- blueprint CSS framework -->
	
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/style.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />

	<title><?php echo CHtml::encode($this->pageTitle); ?> - Tigers Group</title>
</head>

<body>

<body>
<div id="container">
<div id="header">
    <div class="fixed">
        <div id="logo" title="D&D Group - Tigers"></div>
        <div id="banner" title="D&D Group - Tigers"></div>
        <div id="menu">
            <?php $this->widget('zii.widgets.CMenu', array(
                        'items' => array(
                            array('label'=>'Home', 'url'=>array('/site/index')),
                            array('label'=>'About', 'url'=>array('/site/page', 'view'=>'about')),
                            array('label'=>'Contact', 'url'=>array('/site/contact')),
                        ), 
            ));?>
        </div>
    </div><!-- End Logo & Banner -->
    <div class="clear"></div>
    <?php if(Yii::app()->user->isGuest): ?>
    <div id="panel">
        <div id="panel-login" class="fixed">
            <img src="images/panel-login-left.png" width="31px" height="25px" />
            <div id="panel-login-form">
            <form method="post" action="index.php?r=site/login">
                <div class="panel-login-input">
                    <label for="username" class="border-round-left">Username</label>
                    <input type="text" name="username" class="border-round-right" size="12" />
                </div>
                <div class="panel-login-input">
                    <label for="password" class="border-round-left">Password</label>
                    <input type="password" name="password" class="border-round-right" size="12" />
                </div>
                <div class="panel-login-input">
                    <input type="submit" name="login" value="Login" class="buttonAsLink border-round" />
                    <a href="index.php?r=users/create">Register?</a>
                </div>
            </form>
            </div>
        </div>
    </div><!-- End Panel -->
    <?php endif; ?>
    <div class="clear"></div>
</div>

<div id="content" class="fixed border-round border-line">
    <div id="top-content" class="alt">
        <div id="slider">
            <img src="images/slide.jpg" width="600px" height="250px" />
        </div>
        <div id="search">
            <?php $this->widget('SearchBlock', array()); ?>
        </div>
        
        <div class="clear"></div>
    </div>
    <div id="main-content">
        <?php echo $content; ?>
    </div>
    <div id="sidebar">
        <div class="box-title">
            <span>User & Products</span>
        </div>
        <div class="box-sidebar">
            <?php 
                if (!Yii::app()->user->isGuest){
                    echo "Chào bạn, ".Yii::app()->user->name; echo "<br>";
                    $userId = Yii::app()->user->getId();
                    $userprofiles = UserProfiles::model()->findByAttributes(array('user_id'=>$userId));
                    $this->widget('zii.widgets.CMenu', array(
                        'items' => array(
                            array('label'=>'Logout', 'url'=>array('/site/logout')),
                            array('label'=>'Đăng bài mới', 'url'=>array('/drug/create')),
                            array('label'=>'Product types', 'url'=>array('/drug/index')),
                            array('label'=>'User profiles', 'url'=>array('/userProfiles/message', 'id'=>$userId)),
                            array('label'=>'Đổi mật khẩu', 'url'=>array('/users/update', 'id'=>$userId)),
                        ), 
                    ));
                    if ($userprofiles) {
                    $this->widget('zii.widgets.CMenu', array(
                        'items' => array(
                            array('label'=>'Edit user profiles', 'url'=>array('/userProfiles/update', 'id'=>$userprofiles->id)),
                        ), 
                    )); 
                    }
                }
            ?>
        </div>
        <div class="box-title">
            <span>Support Online</span>
        </div>
        <div class="box-sidebar">
            <p>Yahoo: <a href="ymsgr:SendIM?buidinhluyen_uet">
                        <img style="border-width:0px;" src="http://opi.yahoo.com/online?u=buidinhluyen_uet&m=g&t=1&l=us">
                      </a>
            </p>
            <p>Skype: <a href="skype:buidinhluyen.uet?call">
                        <img width="114" height="20" alt="My status" style="border: none;" src="http://mystatus.skype.com/smallclassic/buidinhluyen.uet">
                      </a>
            </p>
            <p>Email: <a href="mailto:penguin.uet@gmail.com?subject=[Hỗ trợ trực tuyến]">penguin.uet@gmail.com</a></p>
        </div>
        
        <div class="box-title">
            <span>Producers:</span>
        </div>
        <div class="box-sidebar">
            <img src="images/producer.jpg" width="180px" height="180px" /><br />
            <p>Xi nghiep duoc pham ABC</p>
        </div>
        
        <div class="box-title">
            <span>Advertisments</span>
        </div>
        <div class="box-sidebar">
            <p>Advs Here</p>
            <p>250px * 180px</p>
        </div>
        
        
        <div class="box-title">
            <span>Advertisments</span>
        </div>
        <div class="box-sidebar">
            <div class="product-list">
                <img src="images/product.jpg" width="80px" height="80px" />
                <p class="product-name">Cephalexin 500mg</p>
                <p>Chỉ định: Cephalexin được chỉ định trong điều trị các nhiễm khuẩn do các vi khuẩn nhạy cảm, nhưng không chỉ định điều trị các nhiễm khuẩn nặng...</p>
                <div class="clear"></div>
            </div>
            
            <div class="product-list">
                <img src="images/product.jpg" width="80px" height="80px" />
                <p class="product-name">Cephalexin 500mg</p>
                <p>Chỉ định: Cephalexin được chỉ định trong điều trị các nhiễm khuẩn do các vi khuẩn nhạy cảm, nhưng không chỉ định điều trị các nhiễm khuẩn nặng...</p>
                <div class="clear"></div>
            </div>
            
            <div class="product-list">
                <img src="images/product.jpg" width="80px" height="80px" />
                <p class="product-name">Cephalexin 500mg</p>
                <p>Chỉ định: Cephalexin được chỉ định trong điều trị các nhiễm khuẩn do các vi khuẩn nhạy cảm, nhưng không chỉ định điều trị các nhiễm khuẩn nặng...</p>
                <div class="clear"></div>
            </div>
        </div>
        
    </div>
    <div class="clear"></div>
    <div id="bottom-content"class="alt">
        <div class="box-title">
            <span>List of Producers</span>
        </div>
        <div class="box-producers">
            <img src="images/producer.jpg" width="100px" height="100px" />
            <img src="images/producer.jpg" width="100px" height="100px" />
            <img src="images/producer.jpg" width="100px" height="100px" />
            <img src="images/producer.jpg" width="100px" height="100px" />
            <img src="images/producer.jpg" width="100px" height="100px" />
            <img src="images/producer.jpg" width="100px" height="100px" />
            <div class="clear"></div>
        </div>
    </div>
</div>

<div id="copyright">
    <div class="fixed">
        <span>Copyright &copy; Tiger - D&D Group - 2011</span>
    </div>
</div>
</div>

</body>
</html>